import App from './views/App.vue'
import components from './components'
import modal from './utils/modal'
import './scss/index.scss'
const eventBus = new Vue()
Vue.prototype.$bus = eventBus

$(
  `<link href="https://unpkg.com/element-ui/lib/theme-chalk/index.css" rel="stylesheet">`
).appendTo('body')

if (process.env.NODE_ENV !== 'development') {
  GM_addStyle(require('./scss/index.scss').default.toString())
} else {
  // require('./scss/index.scss')
}
$(`<div id="tampermokey-app"></div>`).appendTo($('body'))
Vue.use(components)
Vue.use(modal)
Vue.use(require('./utils/http'))
// 事件总线
Vue.prototype.$ELEMENT = { size: 'mini' }
new Vue({
  el: '#tampermokey-app',
  render: (h) => h(App)
})
